<template>
  <div>
    <h2 align="center">用户理财赎回明细</h2>
    <table class="table table-bordered">
      <tr>
        <td>理财项目编号</td>
        <td>账户名称</td>
        <td>理财名称</td>
        <td>用户购买金额</td>
        <td>赎回金额</td>
      </tr>

      <tr v-for="item in list" :key="item.I_Id">
        <td>{{ item.F_Id }}</td>
        <td>{{ item.UL_Name }}</td>
        <td>{{ item.F_Name }}</td>
        <td>{{ item.UF_Money }}</td>
        <td>{{ item.URedeem_Money }}</td>
      </tr>
    </table>
  </div>
</template>

<script setup lang="ts">

import {reactive,toRefs,onMounted} from 'vue'

import axios from 'axios';

import {useRouter,useRoute} from 'vue-router'

import moment from 'moment';

let router = useRouter()
let route = useRoute()

//数据
let data:any = reactive({
  list:[]

})

let {list} = toRefs(data)

onMounted(()=>{
  gerList()
})

//根据投资的ID查询当前项目有哪些人投资
const gerList =()=>{
  axios({
    url:'/api/Finance/ShowUserRedeemList',
    method:'get',
    params:{
      F_Id:route.query.F_Id
    }
  }).then(res=>{
    console.log(res);
    list.value=res.data.data
  }).catch(err=>{
    console.log(err);
  })
}

</script>

<style scoped>

</style>